#ifndef _HY_AUTH_SESSION_H_
#define _HY_AUTH_SESSION_H_

#include "hy_session.h"
#include "hy_enter_packet_tactics.h"

class hy_auth_net_module;
class hy_auth_session : public hy_session
{
	typedef hy_auth_net_module service_t;
public:
	class hy_chat_input : public hy_enter_packet_input<service_t>
	{
	public:
		hy_chat_input(service_t* service,hy_handle_base* hb)
			:hy_enter_packet_input<service_t>(service,hb)
		{

		}	
	};

	class hy_chat_output: public hy_enter_packet_output<service_t>
	{
	public:
		hy_chat_output(service_t* service,hy_handle_base* hb)
			:hy_enter_packet_output<service_t>(service,hb)
		{

		}	
	};

	class hy_chat_state: public hy_session_state<service_t>
	{
	public:
		hy_chat_state(service_t* service,hy_handle_base* hb)
			:hy_session_state<service_t>(service,hb)
		{

		}	
	};

public:
	hy_auth_session(hy_socket_t sc,hy_auth_net_module* service)
		:hy_session(sc),_input(service,this),_output(service,this),_state(service,this),_service(service)
	{

	}
	~hy_auth_session(){}

	hy_err_t init(hy_reactor_base* re,hy_input_tactics* input,hy_output_tactics* output,hy_state_notify* conn = NULL)
	{
		return hy_session::init( re,&_input,&_output,&_state);
	}

protected:
	service_t*		_service;

	hy_chat_input	_input;
	hy_chat_output	_output;
	hy_chat_state	_state;
};
#endif  //_HY_AUTH_SESSION_H_
